package com.sqx.modules.trendsComment.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.app.entity.SysEvaluate;
import com.sqx.modules.trendsComment.entity.TrendsComment;
import com.sqx.modules.trendsComment.vo.TrendsCommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 动态评论 Mapper 接口
 * </p>
 *
 * @author wuChang
 * @since 2023-09-26
 */
@Mapper
public interface TrendsCommentDao extends BaseMapper<TrendsComment> {

    List<TrendsCommentVo> getTrendsCommentList(@Param("byUserId") Long byUserId, @Param("trendsId") Long trendsId);

    IPage<TrendsCommentVo> getCommentList(@Param("pages") Page<TrendsCommentVo> pages, @Param("byUserId") Long byUserId, @Param("trendsComment") TrendsComment trendsComment);


    IPage<TrendsCommentVo> getUnreadCommentList(@Param("pages") Page<TrendsCommentVo> pages, @Param("userId") Long userId);

    int updateByTrendsId(@Param("trendsId")Long trendsId);

    IPage<TrendsComment> selectPageByEvaluateList(Page<TrendsComment> pages1, SysEvaluate sysEvaluate);

    IPage<TrendsCommentVo> getAdminCommentList(@Param("pages")Page<TrendsCommentVo> pages,@Param("trendsComment") TrendsComment trendsComment);

    IPage<TrendsCommentVo> getAppCommentList(Page<TrendsCommentVo> pages, Long byUserId, TrendsComment trendsComment);

    List<TrendsCommentVo> selectListByCommentId(@Param("trendsCommentVo") TrendsCommentVo trendsCommentVo);
}
